<?php
/**
 * 基础物料预占流水表
 *
 * @author kamisama.xia@gmail.com 
 * @version 0.1
 */

$db['basic_material_stock_freeze']=array (
  'columns' =>
  array (
    'bmsf_id' => array(
        'type'     => 'int unsigned',
        'required' => true,
        'pkey'     => true,
        'extra'    => 'auto_increment',
        'editable' => false,
    ),
    'bmsq_id' =>
    array (
        'type' => 'int',
        'comment' => '配额ID',
        'editable' => false,
    ),
    'bm_id' =>
    array (
        'type' => 'int unsigned',
        'comment' => '物料ID',
        'editable' => false,
    ),
    'obj_id' => array(
        'type' => 'int unsigned',
        'comment' => '对象ID',
        'default' => 0,
        'editable' => false,
    ),
    'obj_type' => array(
        'type' => 'tinyint(1)',
        'comment' => '对象类型',
        'editable' => false,
    ),
    'shop_id' => array(
        'type' => 'varchar(32)',
        'comment' => '店铺ID',
        'editable' => false,
    ),
    'branch_id' => array(
        'type' => 'number',
        'comment' => '仓库ID',
        'default' => 0,
        'editable' => false,
    ),
    'num' => array(
        'type' => 'number',
        'comment' => '冻结数',
        'default' => 0,
        'editable' => false,
    ),
  ),
  'index' =>
    array (
    'ind_obj_type' =>
        array (
        'columns' =>
            array (
                0 => 'obj_type',
            ),
       ),
    'ind_obj_id' =>
        array (
        'columns' =>
            array (
            0 => 'obj_id',
            ),
        ),
    'ind_bm_id' =>
        array(
        'columns' =>
            array(
                0 => 'bm_id',
            ),
        ),
    ),
  'comment' => '基础物料预占流水表',
  'engine' => 'innodb',
  'version' => '$Rev:  $',
);

